package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Accident;
import cn.wolfcode.crm.query.AccidentObjectQuery;
import cn.wolfcode.crm.query.ObjectQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface AccidentMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Accident record);

    Accident selectByPrimaryKey(Long id);

    List<Accident> selectAll();

    int updateByPrimaryKey(Accident record);

    int queryForCount(ObjectQuery qo);

    List<Accident> queryForList(ObjectQuery qo);

    /**
     * 改变验证状态
     *
     * @param accident 传入封装进accident的值
     */
    void changeClaimState(Accident accident);

    Long getClaimIdByAccidentId(Long accidentId);

    List<Map> queryCaseItem(AccidentObjectQuery qo);

    void saveAccidentAndBillRelation(@Param("insurerId") Long insurerId, @Param("billId") Long billId);
}